% THIS THE THE MASTER DOCUMENT, thesis.tex

% Possible document classes:
%\documentclass[a4paper,11pt,oneside,titlepage]{scrbook} % setcounters!
%\documentclass[a4paper,12pt,oneside,titlepage]{amsbook}

% A thesis is a book. Really.
\documentclass[a4paper,11pt,oneside,titlepage]{book}

% We want fancy headings with dotted lines under them.
\usepackage{fancyhdr}
\setlength{\unitlength}{18mm}
\newcommand{\blob}{\rule[-.2\unitlength]{2\unitlength}{.5\unitlength}}
\newcommand\rblob{\thepage
	\begin{picture}(0,0)
		\put(1,-\value{section}){\blob}
	\end{picture}}
\newcommand\lblob{%
	\begin{picture}(0,0)
		\put(-3,-\value{section}){\blob}
	\end{picture}%
	%\thepage
}
\pagestyle{fancy}
\newpage
\thispagestyle{empty}
\lhead{\thechapter}
\chead{}
\rhead{}
\lfoot{}
\rfoot{\thepage}
\cfoot{}

\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{\marginparwidth}
%\renewcommand{\headrule}{\vbox to 0pt{\hbox 
%	to \headwidth{\dotfill}\vss}}
%\renewcommand{\footrule}{\vbox to 0pt{\hbox
%	to \headwidth{\dotfill}\vss}}

% Only number 4 sections deep.
\setcounter{secnumdepth}{4}

% Give only chapters and not any deeper in the TOC.
\setcounter{tocdepth}{2}

% Natbib for the bibliography, always. sort&compress will make i.e. [1-5,7].
%\usepackage[square,numbers,sort&compress]{natbib}
\usepackage[authoryear,sort]{natbib}
\setlength{\bibhang}{0ex}

% Use scalable, PostScript Type 1 versions of the Computer Modern fonts.
\usepackage{type1cm}

%Use the PostScript Type 1 version of Times
%\usepackage{pslatex}
% others: pslatex, times, palatcm, charter, helvet, palatino, avant, newcent, bookman
% On my LaTeX installation, pslatex messes up my formulas, so I use Times in stead:
\usepackage{times}

% Text encoding to take for data input stream. I.e. the text we write in.
\usepackage[latin1]{inputenc}

% Use the cool AMS fonts, math symbols, etc everywhere.
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{wasysym} % Needed symbols

% OK, we're talking american in this thesis.
\usepackage[american]{babel}

% How to encode fonts.
\usepackage[T1]{fontenc}

% Be able to take graphics
\usepackage[dvips,pdftex]{graphicx}
%usepackage[dvips]{graphicx}

% At some later stage, we might want to make a compressed version with two columns, like real published articles.
%\usepackage{multicol}

% Packages to allow us to rotate things.
\usepackage{rotating}
\usepackage{rotfloat}

% Leave the smallest margins on A4 paper.
\usepackage{a4wide}

% How much to skip between paragraphs
%\setlength\parskip{\medskipamount}
\setlength\parskip{\bigskipamount}

% We don't want the beginning of a paragraph indented.
\setlength\parindent{0pt}

% We need double spacing for the draft, at least. Also required by Univ. PTA.
\usepackage{setspace}
%\onehalfspacing
%\doublespacing

% Package for formatting sequence alignments
% Most people won't need this.
%\usepackage{texshade}

\begin{document}
\frontmatter
\include{title}

\setcounter{page}{1}
\onehalfspacing
\include{keywords}
\include{abstract}
\include{declaration}
\tableofcontents
\listoffigures
\listoftables
\include{acknowledgments}
\include{glossary}

\fancyhead[LO]{\leftmark}

\mainmatter

% Here we include all the separately prepared chapters.
\include{introduction}
\include{chapter_2}
\include{chapter_3}
\include{chapter_4}
\include{chapter_5}
\include{chapter_6}
\include{conclusion}

\bibliographystyle{plain}
\bibliography{../Papers/References}

\addcontentsline{toc}{chapter}{\protect\numberline{Bibliography\hspace{-96pt}}} 
		 
% If you have appendices, uncomment these two lines
%\appendix
%\include{A_appendixA}

\backmatter
\end{document}